var popWin = "";

function openwin(URL, strWidth, strHeight){

if (popWin != ""){popWin.close()}
leftStr = (screen.width-strWidth)/2;
topStr = (screen.height-strHeight)/2;
windowProperties = "toolbar=no,menubar=no,scrollbars=yes,statusbar=yes,height="+strHeight+",width="+strWidth+",left="+leftStr+",top="+topStr+"";
isDay = new Date();
isID = isDay.getTime();
popWin = window.open(URL,isID,windowProperties);
}

  function hidediv(pass) {
    var divs = document.getElementsByTagName('div');
    for(i=0;i<divs.length;i++){
      if(divs[i].id.match(pass)){ //if they are 'see' divs
        if (document.getElementById) // DOM3 = IE5, NS6
        divs[i].style.visibility="hidden";// show/hide
        else
        if (document.layers) // Netscape 4
        document.layers[divs[i]].display = 'hidden';
        else // IE 4
        document.all.hideshow.divs[i].visibility = 'hidden';
      }
    }
  }

  function showdiv(pass) {

    var divs = document.getElementsByTagName('div');
    for(i=0;i<divs.length;i++){
      if(divs[i].id.match(pass)){
        if (document.getElementById)
        divs[i].style.visibility="visible";
        else
        if (document.layers) // Netscape 4
        document.layers[divs[i]].display = 'visible';
        else // IE 4
        document.all.hideshow.divs[i].visibility = 'visible';
      }
    }
  }

  function get_radio_value()
    {
      for (var i=0; i < document.FORM_ASSOC.assoc_answer.length; i++)
         {
         if (document.FORM_ASSOC.assoc_answer[i].checked)
            {
            var rad_val = document.FORM_ASSOC.assoc_answer[i].value;
            }
         }
    }

 function addText()
  {
      for (var i=0; i < this.document.FORM_ASSOC.assoc_answer.length; i++)
         {
           if (document.FORM_ASSOC.assoc_answer[i].checked)
              {
              var CheckValue = document.FORM_ASSOC.assoc_answer[i].value;

              }
         }

    window.opener.document.FORM_CREATE_QN.posted_associated_answer.value = CheckValue;
    window.close();
  }

 function clearText()
  {
    document.FORM_CREATE_QN.posted_associated_answer.value = '';
  }

